//
//  EOGenericRecordAdditions.java
//  WOGroovy
//

package groovy.lang.webobjects.categories;

import java.util.Map;

import com.webobjects.foundation.*;
import com.webobjects.eocontrol.*;

public class EOGenericRecordAdditions {

    //
    // accessing
    //
    
    public static Object getAt(EOGenericRecord self, String key) {
        return self.valueForKey(key);
    }
        
    public static void putAt(EOGenericRecord self, String key, Object object) {
    	self.takeValueForKey(object, key);
    }
    
    public static void put(EOGenericRecord self, Map map) {
    	NSDictionary dictionary = new NSDictionary(map, true);
    	self.takeValuesFromDictionary(dictionary);
    }
    
    public static void put(EOGenericRecord self, NSDictionary dictionary) {
    	self.takeValuesFromDictionary(dictionary);
    }
}
